{{ content() }}

<section id="main">
    <h2 style="margin:20px">
        Chỉnh sửa tài liệu
    </h2>
    {{form('id':'adminForm','class':'adminForm','enctype':'multipart/form-data','method':'post')}}
    {{form.messages('edit_doc')}}
    <table class="form-table edit_doc">
        <tbody>
            <tr>
                <th>Tên tài liệu:</th>
                <td>{{form.render('title')}}{{form.messages('title')}}</td>
            </tr>
            <tr>
                <th>Loại tài liệu:</th>
                <td>{{form.render('doctype_id')}}{{form.messages('doctype_id')}}</td>
            </tr>

            <tr>
                <th>Chủ đề:</th>
                <td>{{form.render('topic_id')}}{{form.messages('topic_id')}}</td>
            </tr>

            <tr>
                <th>File ảnh:</th>
                <td><img src="{{url('public/review/'~doc.topic_id~'/'~doc.id~'/'~doc.image)}}"><br>
                    {{form.render('image')}}</td>
            </tr>
            <tr>
                <th>Mô tả:</th>
                <td>{{form.render('description',['rowspan':'4'])}}{{form.messages('description')}}</td>
            </tr>
            <tr class="postday"> 
                <th>Ngày đăng:</th>
                <td>{{form.render('submitdate')}}{{form.messages('submitdate')}}</td>
            </tr>
            <tr class="cost"> 
                <th>Giá tiền:</th>
                <td>{{form.render('cost')}}{{form.messages('cost')}}</td>
            </tr>
            <tr style="display: none"> 
                <th>Link down:</th>
                <td>{{form.render('link')}}{{form.messages('link')}}</td>
            </tr>
            <tr style="display: none"> 
                <th>Link xem:</th>
                <td>{{form.render('review')}}{{form.messages('review')}}</td>
            </tr>
            <tr class="dowloaded"> 
                <th>Lượt down:</th>
                <td>{{form.render('download')}}{{form.messages('download')}}</td>
            </tr>
            <tr> 
                <th>Trạng thái:</th>
                <td>{{form.render('public')}}{{form.messages('public')}}</td>
            </tr>
            <tr>
                <th></th>
                <td><button class="button">Thay đổi</button></td>
            </tr>
        </tbody>
    </table>
    {{ form.render('csrf', ['value': security.getToken()]) }}
    {{ form.messages('csrf') }}
    {{endform()}}
</section>
{{javascript_include('js/admin/upload.js')}}